1. Field of the Invention
The present invention relates to a data processing apparatus and, more particularly, to a method and a device for assigning I/O address in a data processing apparatus which is capable of changing the assignment of the address to an I/O port.
2. Description of the Related Art
Printer, RS-232C, floppy disk drive (FDD), hard disk drive (HDD), etc. are connected to personal computers and the like through standard ports. Since the number of standard ports is different depending upon the demand of the user, the main unit of a personal computer is generally provided with an extension slot (I/O slot) and a standard port is added by inserting an additional board provided with a standard port into the I/O slot.
Devices such as a printer are often necessary to a personal computer. Most personal computers are therefore provided with standard ports for such devices in the main unit as the standard equipments.
In this case, if the standard port in the main unit and the standard port on the additional board which is inserted into the I/O slot have the same function, since the addresses of both standard ports are the same, there is a concern that both standard ports will not be operable due to the conflict in addresses.
To preclude this possibility, an additional board generally has a DIP switch for setting the address of the standard port thereon, and it is possible to change the I/O address of the standard port on the additional board by operating the DIP switch, thereby preventing the conflict of both standard ports.
As shown in FIG. 5, such an additional board is provided with a connecting portion 1 which is connected to the main unit, a decoder 2, a standard port 3 and a DIP switch 4. An address signal supplied from the main unit through an address bus A is input to the decoder 2. When the address signal indicates a preset value (preset address), the decoder 2 supplies a decoding signal (chip selecting signal CS), which indicates that the standard port 3 is selected, to the standard port 3.
The I/O address which is to be assigned to the standard port 3 is determined in accordance with the I/O device which is to be connected to the standard port 3. There are two addresses, for example, a primary address and a secondary address for one I/O device. The decoder 2 can decode either of the addresses.
The DIP switch 4 is connected to the decoder 2, and the decoder 2 can select the I/O address to be decoded by turning on and off the DIP switch 4. A connector 3a connects the additional board to an external device such as a printer.
When the address of the standard port 3 on the additional board is actually assigned, the DIP switch 4 is operated so as to prevent the address of the standard port 3 on the additional board from being identical to the address of the standard port in the main unit, thereby preventing the conflict of both standard ports.
However, in setting the additional board, it is necessary for the user to refer to the manual or the like before setting the DIP switch and then to operate the DIP switch. This operation is troublesome and involves a possibility of error when setting the DIP switch. In addition, in personal computers or the like, since a new model is frequently developed, the corresponding model is sometimes not described in the manual for the additional board. In such case, it is necessary for the user to refer to the manuals for both the main unit and the additional board in order to know the addresses of the standard port in the main unit and the standard port on the additional board and to set the DIP switch so as to prevent the conflict of both standard ports. This operation is very difficult. It is therefore demanded to facilitate the operation at the time of using the additional board such as the setting of the DIP switch and to omit such operation, if possible, thereby preventing an error in setting the DIP switch.